<?php
/**
 * List View Single Event
 * This file contains one event in the list view
 *
 * Override this template in your own theme by creating a file at [your-theme]/tribe-events/list/single-event.php
 *
 * @package TribeEventsCalendar
 * @since  3.0
 * @author Modern Tribe Inc.
 *
 */
if (!defined('ABSPATH')) {
    die('-1');
}
?>

<?php
// Setup an array of venue details for use later in the template
$venue_details = array();

if ($venue_name = tribe_get_meta('tribe_event_venue_name')) {
    $venue_details[] = $venue_name;
}

if ($venue_address = tribe_get_meta('tribe_event_venue_address')) {
    $venue_details[] = $venue_address;
}
// Venue microformats
$has_venue = ( $venue_details ) ? ' vcard' : '';
$has_venue_address = ( $venue_address ) ? ' location' : '';

$organizer = array();
$organizer_name = tribe_get_meta('tribe_event_organizer_name');
$organizer_phone = tribe_get_meta('tribe_event_organizer_phone');
$organizer_email = tribe_get_meta('tribe_event_organizer_email');
$organizer_website = tribe_get_meta('tribe_event_organizer_website');
if ($organizer_name != "") {
    $organizer[] = strip_tags($organizer_name);
}
if ($organizer_phone != "") {
    $organizer[] = str_replace('Phone:', '', strip_tags($organizer_phone));
}
//debug($organizer);
?>
<style>
   
   
</style>
<script>
    $(document).ready(function() {
//        $('.notify_me_trigger, .notify_me_content').hover(function() {//hover
//            $(this).parent().find('.notify_me_content').show();
//        }, function() { //hover out
//            $(this).parent().find('.notify_me_content').hide();
//        });
    });
</script>

<!-- Event NOTIFY -->
<?php get_event_notification(get_the_ID(), get_the_title()); ?> 

<!-- Event Title -->
<?php do_action('tribe_events_before_the_event_title') ?>
<h2 class="tribe-events-list-event-title summary">
    <a class="url" href="<?php echo tribe_get_event_link() ?>" title="<?php the_title() ?>" rel="bookmark">
        <?php the_title() ?>
    </a><p> | <?php echo tribe_events_event_schedule_details() ?></p>
    <div class="clear"></div>
</h2>
<?php do_action('tribe_events_after_the_event_title') ?>

<!-- Event Meta -->
<?php do_action('tribe_events_before_the_meta') ?>
<div class="event-details tribe-events-event-meta <?php echo $has_venue . $has_venue_address; ?>">

    <!-- Schedule & Recurrence Details -->
    <div class="updated published time-details">
        <?php echo tribe_events_event_recurring_info_tooltip() ?>
    </div>
    <div class="clear"></div>
    <a href="<?php echo get_permalink();?>"><?php get_thumbnail('medium');//tribe_event_featured_image(null, 'medium') ?></a> 
    <ul class="detail">
        <li><label>Date / Time:</label> <?php echo tribe_events_event_schedule_details() ?><?php echo tribe_events_event_recurring_info_tooltip() ?></li>
        <?php if ($venue_details) : ?>
            <li>
                <label>Venue: </label>
                <?php echo implode(', ', $venue_details); ?>
            </li>
        <?php endif; ?>
        <li><label>Tickets:</label><?php if (tribe_get_cost()) : ?> <?php echo tribe_get_cost(null, true); ?><?php endif; ?></li>
        <li><label>Contact:</label><?php echo implode(', ', $organizer); ?></li>
        <li><label>Brief Detail:</label><?php echo excerpt(50); ?></li>
        <li style="margin-bottom: 5px;"><?php 
        $attr = array(
            'start_date'=>get_post_meta(get_the_ID(),'_EventStartDate',true),
            'end_date'=>get_post_meta(get_the_ID(),'_EventEndDate',true),
            'title'=>  get_the_title(),
            'description'=>  strip_tags(get_the_content()),
            'location'=>  strip_tags($venue_address),
            'organizer'=> strip_tags($organizer_name),
            'organizer_email'=> str_replace('Email:', '', strip_tags($organizer_email)),
            'all_day_event'=>get_post_meta(get_the_ID(),'_EventAllDay',true),
        );
        echo dktm_event_share($attr); ?></li>
        <li><?php echo dktm_share(); ?></li>
        
    </ul>


    <div class="clear"></div>



</div><!-- .tribe-events-event-meta -->
<?php do_action('tribe_events_after_the_meta') ?>

<!-- Event Image -->


<!-- Event Content -->
<?php do_action('tribe_events_before_the_content') ?>
<!--
<div class="tribe-events-list-event-description tribe-events-content description entry-summary clearfix">
<?php the_excerpt() ?>
        <a href="<?php echo tribe_get_event_link() ?>" class="tribe-events-read-more" rel="bookmark"><?php _e('Find out more', 'tribe-events-calendar') ?> &raquo;</a>
</div> -->
<?php do_action('tribe_events_after_the_content') ?>